<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>商品首页</title>
	<link rel="stylesheet" href="http://localhost/Gshop/template/css/index.css"  type="text/css" />
	<script type="text/javascript" src='http://localhost/Gshop/template/js/jquery-1.7.2.min.js'></script>
	<script type="text/javascript" src='http://localhost/Gshop/template/js/jd.js'></script>
</head>
<body>
<!-- 最顶部的可关闭广告 -->
<!-- <div id='top_ad'><img src="http://localhost/Gshop/template/images/top_ad.jpg" alt="" /></div> -->
<!-- 最顶部的可关闭广告结束-->
<!-- 头部灰色区域 -->
<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>京东首页</title>	
	<link rel="stylesheet" href="./css/head.css"  type="text/css" />
</head>
<body>
<!-- 最顶部的可关闭广告 -->
<!-- <div id='top_ad'><img src="./images/top_ad.jpg" alt="" /></div> -->
<!-- 最顶部的可关闭广告结束-->
<!-- 头部灰色区域 -->
	<div id="top">
		<div class="top_main">
			<!-- 左侧 -->
			<div class="top_l fl">
				<p class="didian"><span class='tu fl'></span><span class='wenzi fl'>北京</span> </p>
			</div>
			<!-- 左侧结束 -->
			<!-- 右侧 -->
			<div class="top_r fr ">
				<ul>
<!-- 头部记录用户是否已经登录开始 -->
			<?php if($_SESSION['user']){?>
					<li><span class='fl'>您好，</span>
						<span><?php echo $_SESSION['user']['uname'];?>！</span>
						<a href="<?php echo U('user/out');?>">退出</a>
					</li>
				<?php  }else{ ?>
					<li><span class='fl'>您好，欢迎来到京东！</span>
						<a href="<?php echo U('user/login',array('main'=>1));?>" class='fl'>[登录]</a> <a href="<?php echo U('user/reg',array('main'=>1));?>" class="denglu fl">[免费注册]</a> <span class='xian fl'>|</span>
					</li>
			<?php }?>
					<li><a href="<?php echo U('Member/index');?>" class="dingdan fl">我的订单</a><span class='xian fl'>|</span></li>
<!-- 头部记录用户是否已经登录结束 -->
				</ul>
			</div>
			<!-- 右侧结束 -->
		</div>
	</div>
<!-- 头部灰色区域结束 -->
<!-- 中间主体区域 -->
	



<!-- 头部灰色区域结束 -->
<!-- 中间主体区域 -->
	<div id="main">
	<!-- logo区域 -->
<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
          <script type="text/javascript" src='http://localhost/Gshop/template/js/jquery-1.7.2.min.js'></script>
         <script type="text/javascript" src='http://localhost/Gshop/template/js/jd.js'></script>
          <link rel="stylesheet" type="text/css" href="http://localhost/Gshop/template/css/logo.css">
    </head>
    <body>
<!-- logo区域开始  -->
    <div class="main_logo ">
      <img src="http://localhost/Gshop/template/images/logo.png" alt="" class="logo" />
      <div class="sousuo">
        <form action="">
          <input type="text" class="shuru fl" value='平板电脑' />
          <input type="submit" class="tijiao fr" value="搜索" />
        </form>
      </div>
      <p >
        <span class='fl'>热门搜索：</span>
<!-- 热门搜索区域开始 -->
      <?php $hd["list"]["h"]["total"]=0;if(isset($hot) && !empty($hot)):$_id_h=0;$_index_h=0;$lasth=min(1000,count($hot));
$hd["list"]["h"]["first"]=true;
$hd["list"]["h"]["last"]=false;
$_total_h=ceil($lasth/1);$hd["list"]["h"]["total"]=$_total_h;
$_data_h = array_slice($hot,0,$lasth);
if(count($_data_h)==0):echo "";
else:
foreach($_data_h as $key=>$h):
if(($_id_h)%1==0):$_id_h++;else:$_id_h++;continue;endif;
$hd["list"]["h"]["index"]=++$_index_h;
if($_index_h>=$_total_h):$hd["list"]["h"]["last"]=true;endif;?>

        <?php if($hd['list']['h']['first']){?>
          <a href="<?php echo U('category',array('cid'=>$h[cid]));?>" class="hong"><?php echo $h['cname'];?></a>
          <?php  }else{ ?>
           <a href="<?php echo U('category',array('cid'=>$h[cid]));?>"><?php echo $h['cname'];?></a>
        <?php }?>
      <?php $hd["list"]["h"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
<!-- 热门搜索区域结束 -->
      </p>

      <div class="jiesuan">
        <div class="jie_kong_da">
          <?php if(!empty($_SESSION['cart']['goods'])){?>
                <ul>
                  <?php $hd["list"]["ca"]["total"]=0;if(isset($cart) && !empty($cart)):$_id_ca=0;$_index_ca=0;$lastca=min(1000,count($cart));
$hd["list"]["ca"]["first"]=true;
$hd["list"]["ca"]["last"]=false;
$_total_ca=ceil($lastca/1);$hd["list"]["ca"]["total"]=$_total_ca;
$_data_ca = array_slice($cart,0,$lastca);
if(count($_data_ca)==0):echo "";
else:
foreach($_data_ca as $key=>$ca):
if(($_id_ca)%1==0):$_id_ca++;else:$_id_ca++;continue;endif;
$hd["list"]["ca"]["index"]=++$_index_ca;
if($_index_ca>=$_total_ca):$hd["list"]["ca"]["last"]=true;endif;?>

                  <li>
                    <div class="img"><img src="http://localhost/Gshop/<?php echo $ca['index_pic'];?>" alt=""></div>
                      <div class="name"><a href="<?php echo U('content',array('gid'=>$ca[gid]));?>"><?php echo $ca['gname'];?></a></div>
                  </li>
                <?php $hd["list"]["ca"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
                </ul>
            <?php  }else{ ?>
                <span class='gou'></span>
                <span class='gouwen' >购物车中还没有商品，赶紧选购吧！</span>
          <?php }?>
        </div>
        <div class="jie">
          <a href="<?php echo U('cart/index');?>" class="fl go">去购物车结算</a><span class='youjiao fl'></span>
        </div>
      </div>   
    </div>
<!-- logo区域结束 -->
    </body>
</html>
	<!--logo区域结束  -->
	<!-- 导航区域 -->
		<div class="menu">
			<a class="menu_l fl ">
				全部商品分类
			</a>
			<div class="menu_r fl">
				<a href="http://localhost/Gshop" class="active">首页</a>
				<a href="<?php echo U('category',array('cid'=>20));?>">数码相机</a>
				<a href="<?php echo U('category',array('cid'=>44));?>">笔记本</a>
			</div>
		</div>
	<!-- 导航区域结束 -->
	<!-- 左分类以及轮换图 -->
		<div class="middle">
		<!-- 左侧 -->
			<div class="middle_l fl">
				<ul>
					<?php $hd["list"]["cate"]["total"]=0;if(isset($category) && !empty($category)):$_id_cate=0;$_index_cate=0;$lastcate=min(1000,count($category));
$hd["list"]["cate"]["first"]=true;
$hd["list"]["cate"]["last"]=false;
$_total_cate=ceil($lastcate/1);$hd["list"]["cate"]["total"]=$_total_cate;
$_data_cate = array_slice($category,0,$lastcate);
if(count($_data_cate)==0):echo "";
else:
foreach($_data_cate as $key=>$cate):
if(($_id_cate)%1==0):$_id_cate++;else:$_id_cate++;continue;endif;
$hd["list"]["cate"]["index"]=++$_index_cate;
if($_index_cate>=$_total_cate):$hd["list"]["cate"]["last"]=true;endif;?>

					<li>
						<div class="bao">
							<span></span>
							<div class="kong"></div>
							<div class="kongshang">
							<a href=""><?php echo $cate['cname'];?></a>
						          </div>
						</div>

						<div class="youkuang">
							<div class="youkuang_l">
							   <?php $hd["list"]["cat"]["total"]=0;if(isset($cate['_data']) && !empty($cate['_data'])):$_id_cat=0;$_index_cat=0;$lastcat=min(1000,count($cate['_data']));
$hd["list"]["cat"]["first"]=true;
$hd["list"]["cat"]["last"]=false;
$_total_cat=ceil($lastcat/1);$hd["list"]["cat"]["total"]=$_total_cat;
$_data_cat = array_slice($cate['_data'],0,$lastcat);
if(count($_data_cat)==0):echo "";
else:
foreach($_data_cat as $key=>$cat):
if(($_id_cat)%1==0):$_id_cat++;else:$_id_cat++;continue;endif;
$hd["list"]["cat"]["index"]=++$_index_cat;
if($_index_cat>=$_total_cat):$hd["list"]["cat"]["last"]=true;endif;?>

								<div class="youkuang_l_div">
									<div class="youkuang_l_div_zi">
										<div><a href=""><?php echo $cat['cname'];?></a></div>
										<ul>
											<?php $hd["list"]["c"]["total"]=0;if(isset($cat['_data']) && !empty($cat['_data'])):$_id_c=0;$_index_c=0;$lastc=min(1000,count($cat['_data']));
$hd["list"]["c"]["first"]=true;
$hd["list"]["c"]["last"]=false;
$_total_c=ceil($lastc/1);$hd["list"]["c"]["total"]=$_total_c;
$_data_c = array_slice($cat['_data'],0,$lastc);
if(count($_data_c)==0):echo "";
else:
foreach($_data_c as $key=>$c):
if(($_id_c)%1==0):$_id_c++;else:$_id_c++;continue;endif;
$hd["list"]["c"]["index"]=++$_index_c;
if($_index_c>=$_total_c):$hd["list"]["c"]["last"]=true;endif;?>

											<li><span>|</span><a href="<?php echo U('category',array('cid'=>$c['cid']));?>"><?php echo $c['cname'];?></a></li>
											<?php $hd["list"]["cate"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
										</ul>
									</div>
								</div>
							   <?php $hd["list"]["cat"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
							</div>
						</div>
					</li>
				<?php $hd["list"]["c"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
			</ul>
		</div>
		<!-- 左侧结束 -->


		<!-- 中间 -->
			<div class="middle_m fl">
				<div class="qiehuan_da">
					<a href="" class="qiehuan">
						<img src="http://localhost/Gshop/template/images/qiehuan.jpg" alt="" />
					</a>
					<a href="" class="qiehuan">
						<img src="http://localhost/Gshop/template/images/qiehuan1.jpg" alt="" />
					</a>
					<a href="" class="qiehuan">
						<img src="http://localhost/Gshop/template/images/qiehuan2.jpg" alt="" />
					</a>
					<a href="" class="qiehuan">
						<img src="http://localhost/Gshop/template/images/qiehuan3.jpg" alt="" />
					</a>
					<a href="" class="qiehuan">
						<img src="http://localhost/Gshop/template/images/qiehuan4.jpg" alt="" />
					</a>
					<a href="" class="qiehuan">
						<img src="http://localhost/Gshop/template/images/qiehuan5.jpg" alt="" />
					</a>
					<div class="qiehuan_da_tu">
						<span class='active'>1</span>
						<span>2</span>
						<span>3</span>
						<span>4</span>
						<span>5</span>
						<span>6</span>
					</div>
				</div>
				
				<div class="qiehuan_xiao">
					<div class="qiehuan_xiao_gun">
						<div class="gun">
							<a href="" class="qiehuan_xiao_l fl"><img src="http://localhost/Gshop/template/images/img1.jpg" alt="" /></a>
							<a href="" class="qiehuan_xiao_l fl"><img src="http://localhost/Gshop/template/images/img2.jpg" alt="" /></a>
							<a href="" class="qiehuan_xiao_l fl"><img src="http://localhost/Gshop/template/images/img3.jpg" alt="" /></a>
							<a href="" class="qiehuan_xiao_l fl"><img src="http://localhost/Gshop/template/images/1.jpg" alt="" /></a>
							<a href="" class="qiehuan_xiao_l fl"><img src="http://localhost/Gshop/template/images/2.jpg" alt="" /></a>
							<a href="" class="qiehuan_xiao_l fl"><img src="http://localhost/Gshop/template/images/3.jpg" alt="" /></a>
							<a href="" class="qiehuan_xiao_l fl"><img src="http://localhost/Gshop/template/images/4.jpg" alt="" /></a>
							<a href="" class="qiehuan_xiao_l fl"><img src="http://localhost/Gshop/template/images/5.jpg" alt="" /></a>
							<a href="" class="qiehuan_xiao_l fl"><img src="http://localhost/Gshop/template/images/6.jpg" alt="" /></a>
							<a href="" class="qiehuan_xiao_l fl"><img src="http://localhost/Gshop/template/images/img1.jpg" alt="" /></a>
							<a href="" class="qiehuan_xiao_l fl"><img src="http://localhost/Gshop/template/images/img2.jpg" alt="" /></a>
							<a href="" class="qiehuan_xiao_l fl"><img src="http://localhost/Gshop/template/images/img3.jpg" alt="" /></a>


						</div>
						
					</div>
					<span class='left_san clear'>
						<span></span>
					</span>

					<span class='right_san clear'>
						<span></span>
					</span>
				</div>
			</div>
		<!-- 中间结束 -->
		<!-- 右侧 -->
		<div class="middle_r">
			<div class="inner">
			<a href="<?php echo U('content',array('gid'=>65));?>"><img src="http://localhost/Gshop/template/images/58291402061396_500X500.jpg" alt="" class="first" /></a>
			<a href="<?php echo U('content',array('gid'=>41));?>"><img src="http://localhost/Gshop/template/images/39491402057245_800X800.jpg" alt="" /></a>
			<a href="<?php echo U('content',array('gid'=>12));?>"><img src="http://localhost/Gshop/template/images/64791402028987_800X800.jpg" alt="" /></a>
			<a href="<?php echo U('content',array('gid'=>31));?>"><img src="http://localhost/Gshop/template/images/83121402054786_500X500.jpg" alt="" /></a>
			<a href="<?php echo U('content',array('gid'=>95));?>"><img src="http://localhost/Gshop/template/images/98501402072411_800X800.jpg" alt="" /></a>
			<a href="{U:'content',array('gid'=>89)}" ><img src="http://localhost/Gshop/template/images/28731402071596_800X800.jpg" alt="" class='first'/></a>
			</div>
		</div>
<!-- 右边图片的显示开始 -->
<script>
// 鼠标放在上面的显隐状态
	$(".middle_r a img").hover(function(){
		$(this).stop().animate({"opacity":'1',"border-radius":'20px','border':'1px solid red'}).siblings('img').css({"opacity":'0.7'});
	},function(){
		$(this).stop().animate({"opacity":'0.7',"border-radius":'0px'});
	})
//边框自动显示
$(".middle_r a img").eq(1).animate({"border-right":"5px"})

</script>
<!-- 右边图片的显示结束 -->
		<!-- 右侧结束 -->
	<!-- 左分类以及轮换图结束-->


	<!-- 橱窗 -->
		<div class="chuchuang ">
			<a class="timu">
				<img src="http://localhost/Gshop/template/images/timu.png" alt="" />
			</a>
			<div class="neirong">
				<ul class="">
					<li class="dapai first">
						<img src="http://localhost/Gshop/template/images/chuchuang_1.jpg" alt="" />
						<div class="zhezhao">
							<h2>大牌秀场</h2>
							<p><a href="">专业内衣品牌</a></p>
							<p class="fl clear">爱慕</p>
							<ul class="xia">
								<li><span class='xiaodian fl'></span class='fl'><span>精致优雅</span></li>
								<li><span class='xiaodian fl'></span><span class='fl'>时尚</span></li>
							</ul>
						</div>
						
					</li>
					<li class="dijia">
					<img src="http://localhost/Gshop/template/images/dijia.jpg" alt="" />
						<div class="zhezhao">
							<h2>天天低价</h2>
							<p><a href="">四地联合大促</a></p>
							<span class="bei">低至3折</span>
						</div>
						
					</li>
					<li class="jingpin">
					<img src="http://localhost/Gshop/template/images/jingpin.jpg" alt="" />
						<div class="zhezhao">
							<h2>精品周刊</h2>
							<p><a href="">开学季</a></p>
							<p>NEW选择</p>
						</div>
						
					</li>
					<li class="tuangou last">
					<img src="http://localhost/Gshop/template/images/tuangou.png" alt="" />
						<div class="zhezhao">
							<h2>今日团购</h2>
							<p><a href="">泰国山竹5斤</a></p>
							<!-- <p>低至3折</p> -->
							<a class="tuan" href="">
								<span class='tuanjia'>团购价</span><span class='jiage'>￥69</span>
							</a>
						</div>
						
					</li>
					<li class="shoufa first">
					<img src="http://localhost/Gshop/template/images/shoufa.jpg" alt="" />
						<div class="zhezhao">
							<h2>京东首发</h2>
							<p><a href="">NIKE 复刻鞋</a></p>
							<p class="bei fl clear">LUNAR FORCE 1</p>
						</div>
						
					</li>
					<li class="temai">
					<img src="http://localhost/Gshop/template/images/temai.jpg" alt="" />
						<div class="zhezhao">
							<h2>品牌特卖</h2>
							<p><a href="">美孚力魔特惠</a></p>
							<p>低至5折</p>
						</div>
						
					</li>
					<li class="yushou">
					<img src="http://localhost/Gshop/template/images/yushou.jpg" alt="" />
						<div class="zhezhao">
							<h2>京东预售</h2>
							<p><a href="">星星的你同款</a></p>
							<p class="bei fl clear">惊爆预约</p>
						</div>
						
					</li>
					<li class="qingchun last">
					<img src="http://localhost/Gshop/template/images/qingchun.jpg" alt="" />
						<div class="zhezhao">
							<h2>青春</h2>
							<p><a href="">衣橱缤纷季</a></p>
							<p>悦见春天</p>
							<ul class="xia">
								<li><span class='xiaodian fl'></span class='fl'><span>歌莉娅</span></li>
								<li><span class='xiaodian fl'></span><span class='fl'>爱慕</span></li>
							</ul>
							
						</div>
						
					</li>
				</ul>
			</div>
			<!-- 橱窗下三广告 -->
			<div class="chuchuang_ad">
				<a href="" class=" fl"><img src="http://localhost/Gshop/template/images/chuchuang_ad.jpg" alt="" /></a>
				<a href="" class=" fl"><img src="http://localhost/Gshop/template/images/chuchuang_ad2.jpg" alt="" /></a>
				<a href="" class="last fl"><img src="http://localhost/Gshop/template/images/chuchuang_ad.jpg" alt="" /></a>
			</div>
			<!--橱窗下三广告结束 -->
		</div>
	<!-- 橱窗结束 -->
<!-- 16 18 20 21 23 24
26 27 29 31 35 36 -->



	<!-- 家电通讯 区域-->
	<div class="jiadian clear ">
		<!-- 左侧 -->
		<div class="jiadian_l  fl">
			<h2>
				<span>1F</span>家电通讯
			</h2>
			<ul class="liebiao"> 
						<?php
		$cid=explode(',','16,18,20,21,23,24,26,27,29,31,35,36');
		$result=M("category")->where(array("cid"=>$cid))->all();
		foreach($result as $field):
			$field['url']=U("category",array("cid"=>$field['cid']));
		?>
				<li><a href="<?php echo $field['url'];?>"><?php echo $field['cname'];?></a></li>
				<?php endforeach?>
			</ul>
			<a href="<?php echo U('category',array('cid'=>'18'));?>" class="jiadian_l_img">
				<img src="http://localhost/Gshop/template/images/539091efNae1e67e9.jpg" alt="" />
			</a>
		</div>
		<!-- 家电通 -->
		<!-- 中间 -->
		<div class="jiadian_m fl ">
			<ul class="jiadian_fenlei">
				<li>特价商品</li>
				<li>大家电</li>
				<li>小家电</li>
				<li>手机通讯</li>
				<li>汽车五金</li>
			</ul>
			<span class='yi'></span>
			<div class="xianei">

<!-- 特价商品区域开始 -->
				<ul class="jiadian_img">
								<?php
			$cid=explode(",",str_replace(' ','', '16,18'));
			$Model=M("goods");
			$result=$Model->order("rand()")->limit(1)->where(array("cid"=>$cid))->all();
			foreach($result as $field):
				$field['url']=U('content',array("gid"=>$field['gid']));
				$field['index_pic']="http://localhost/Gshop/".$field['index_pic'];
			
			?>
						<li >
							<a href="<?php echo $field['url'];?>" class="jiadian_img_a"><img src="<?php echo $field['index_pic'];?>" alt="" class='index_pic'/></a>
							<a href="<?php echo $field['url'];?>" class="name" ><?php echo $field['gname'];?></a>
							<span >￥<?php echo $field['price'];?></span>
					  	</li>
					  <?php endforeach ?>
					<li class="da">
						<a href="<?php echo U('category',array('cid'=>16));?>" class="show"><img src="http://localhost/Gshop/template/images/53918e8bNe660e0a1.jpg" alt="" /></a>
						<a href="{U:'category',array('cid'=>58)}"><img src="http://localhost/Gshop/template/images/5391e0e1N05c9b790.jpg" alt="" /></a>
						<a href="<?php echo U('category',array('cid'=>24));?>"><img src="http://localhost/Gshop/template/images/538e8dffN0421b2f1.jpg" alt="" /></a>
						<a href="<?php echo U('category',array('cid'=>24));?>"><img src="http://localhost/Gshop/template/images/jiadian_qiehuan3.jpg" alt="" /></a>
						<p>
							<span class='xuan'></span>
							<span ></span>
							<span ></span>
							<span ></span>
						</p>
					</li>
					
							<?php
			$cid=explode(",",str_replace(' ','', '20,21,23,24,26,27,29,31'));
			$Model=M("goods");
			$result=$Model->order("rand()")->limit(1,6)->where(array("cid"=>$cid))->all();
			foreach($result as $field):
				$field['url']=U('content',array("gid"=>$field['gid']));
				$field['index_pic']="http://localhost/Gshop/".$field['index_pic'];
			
			?>
					<li>
						<a href="<?php echo $field['url'];?>" class="jiadian_img_a"><img src="<?php echo $field['index_pic'];?>" alt="" /></a>
						<a href="<?php echo $field['url'];?>" class="name"><?php echo $field['gname'];?></a>
						<span>￥<?php echo $field['price'];?></span>
					</li>
				<?php endforeach ?>

				</ul>
<!-- 特价商品区域结束 -->


<!-- 大家电区域开始 -->
				<ul >
								<?php
			$cid=explode(",",str_replace(' ','', '18,21,24,27'));
			$Model=M("goods");
			$result=$Model->order("rand()")->limit(10)->where(array("cid"=>$cid))->all();
			foreach($result as $field):
				$field['url']=U('content',array("gid"=>$field['gid']));
				$field['index_pic']="http://localhost/Gshop/".$field['index_pic'];
			
			?>
					<li >
						<a href="<?php echo $field['url'];?>" class="jiadian_img_a"><img src="<?php echo $field['index_pic'];?>" alt="" /></a>
						<a href="<?php echo $field['url'];?>" class="name"><?php echo $field['gname'];?></a>
						<span><?php echo $field['price'];?></span>
				  	</li>
				  	<?php endforeach ?>
				</ul>
<!-- 大家电区域结束 -->

<!-- 小家电区域开始 -->
				<ul >
								<?php
			$cid=explode(",",str_replace(' ','', '21,26,29,27'));
			$Model=M("goods");
			$result=$Model->order("rand()")->limit(10)->where(array("cid"=>$cid))->all();
			foreach($result as $field):
				$field['url']=U('content',array("gid"=>$field['gid']));
				$field['index_pic']="http://localhost/Gshop/".$field['index_pic'];
			
			?>
					<li >
						<a href="<?php echo $field['url'];?>" class="jiadian_img_a"><img src="<?php echo $field['index_pic'];?>" alt="" /></a>
						<a href="<?php echo $field['url'];?>" class="name"><?php echo $field['gname'];?></a>
						<span><?php echo $field['price'];?></span>
				  	</li>
				  	<?php endforeach ?>
				</ul>
<!-- 小家电区域结束 -->

<!-- 手机通讯区域开始 -->
				<ul >
								<?php
			$cid=explode(",",str_replace(' ','', '16,54,23,53'));
			$Model=M("goods");
			$result=$Model->order("rand()")->limit(10)->where(array("cid"=>$cid))->all();
			foreach($result as $field):
				$field['url']=U('content',array("gid"=>$field['gid']));
				$field['index_pic']="http://localhost/Gshop/".$field['index_pic'];
			
			?>
					<li >
						<a href="<?php echo $field['url'];?>" class="jiadian_img_a"><img src="<?php echo $field['index_pic'];?>" alt="" /></a>
						<a href="<?php echo $field['url'];?>" class="name"><?php echo $field['gname'];?></a>
						<span><?php echo $field['price'];?></span>
				  	</li>
				  	<?php endforeach ?>
				</ul>
<!--手机通讯区域结束  -->

<!-- 汽车五金区域开始 -->
				<ul >
								<?php
			$cid=explode(",",str_replace(' ','', '20,45,23,53'));
			$Model=M("goods");
			$result=$Model->order("rand()")->limit(10)->where(array("cid"=>$cid))->all();
			foreach($result as $field):
				$field['url']=U('content',array("gid"=>$field['gid']));
				$field['index_pic']="http://localhost/Gshop/".$field['index_pic'];
			
			?>
					<li >
						<a href="<?php echo $field['url'];?>" class="jiadian_img_a"><img src="<?php echo $field['index_pic'];?>" alt="" /></a>
						<a href="<?php echo $field['url'];?>" class="name"><?php echo $field['gname'];?></a>
						<span><?php echo $field['price'];?></span>
				  	</li>
				  	<?php endforeach ?>
				</ul>
<!-- 汽车五金区域结束 -->
			</div>
			


		</div>
		<!-- 中间结束 -->
		<!-- 右侧 -->
		<div class="like">
			<h2 class='top'>
				热销推荐
			</h2>
			<ul >
				<li>
					<a href="<?php echo U('content',array('gid'=>4));?>"><img src="http://localhost/Gshop/template/images/85071402025919_800X800.jpg" alt="" /></a>
					<span>魅族 MX3 16G 3G手机（前黑后白） TD-SCDMA/GSM</span>
				</li>
				<li>
					<a href="<?php echo U('content',array('gid'=>17));?>"><img src="http://localhost/Gshop/template/images/25071402046774_500X500.jpg" alt="" /></a>
					<span>奥马（Homa） BCD-186F 186升 双门冰箱 银红双色</span>
				</li>
				<li>
					<a href="<?php echo U('content',array('gid'=>31));?>"><img src="http://localhost/Gshop/template/images/83121402054786_500X500.jpg" alt="" /></a>
					<span>飞科（FLYCO） FS357 旋转式三刀头</span>
				</li>
				<li>
					<a href="<?php echo U('content',array('gid'=>55));?>"><img src="http://localhost/Gshop/template/images/45711402060213_500X500.jpg" alt="" /></a>
					<span>Masentek S30 蓝牙耳机 黑色</span>
				</li>
				<li>
					<a href="<?php echo U('content',array('gid'=>95));?>"><img src="http://localhost/Gshop/template/images/98501402072411_500X500.jpg" alt="" /></a>
					<span>精美礼品 LED触摸调光小台灯充电小夜灯</span>
				</li>
				<li>
					<a href="<?php echo U('content',array('gid'=>38));?>"><img src="http://localhost/Gshop/template/images/5241402056805_500X500.jpg" alt="" /></a>
					<span>赛德斯（Sades） SA-810 头戴式 游戏玩家 定制耳机(黑蓝)</span>
				</li>
			</ul>
		</div>
		<!-- 右侧结束 -->
	</div>
	<!-- 家电通讯结束 -->
<!-- 让热销区域的产品动起来 -->
<script>
// 获得最后一个产品
function run(){
var last=$('.like ul li:last');
     last.css({"height":'0px'});
   	$(".like ul").prepend(last);
   	$('.like ul li:first').animate({"height":"90px"});
}
setInterval(run,2000);
</script>
<!-- 热销区域的产品动起来结束 -->





<!-- 40 20 43 44 45 46 47
49 51 54 56 58 59 42 -->
<!-- 电脑数码区域开始 -->
	<div class="jiadian clear ">
<!-- 左侧 -->
		<div class="jiadian_l  fl">
			<h2>
				<span>2F</span>电脑数码
			</h2>
			<ul class="liebiao"> 
						<?php
		$cid=explode(',','40,20,43,44,45,46,47,49,51,54,56,58,59,42');
		$result=M("category")->where(array("cid"=>$cid))->all();
		foreach($result as $field):
			$field['url']=U("category",array("cid"=>$field['cid']));
		?>
				<li><a href="<?php echo $field['url'];?>"><?php echo $field['cname'];?></a></li>
				<?php endforeach?>
			</ul>
			<a href="" class="jiadian_l_img">
				<img src="http://localhost/Gshop/template/images/53912237N143842b1.jpg" alt="" />
			</a>
		</div>
<!-- 左侧电脑数码区域结束-->

<!-- 中间 -->
		<div class="jiadian_m fl ">
			<ul class="jiadian_fenlei">
				<li>特价商品</li>
				<li>笔记本</li>
				<li>数码影音</li>
				<li>电脑配件</li>
				<li>外设办公</li>
			</ul>

			<span class='yi'></span>
			<div class="xianei">
				<ul class="jiadian_img">
								<?php
			$cid=explode(",",str_replace(' ','', '40'));
			$Model=M("goods");
			$result=$Model->order("rand()")->limit(1)->where(array("cid"=>$cid))->all();
			foreach($result as $field):
				$field['url']=U('content',array("gid"=>$field['gid']));
				$field['index_pic']="http://localhost/Gshop/".$field['index_pic'];
			
			?>
						<li >
							<a href="<?php echo $field['url'];?>" class="jiadian_img_a"><img src="<?php echo $field['index_pic'];?>" alt="" class='index_pic'/></a>
							<a href="<?php echo $field['url'];?>" class="name" ><?php echo $field['gname'];?></a>
							<span >￥<?php echo $field['price'];?></span>
					  	</li>
					  <?php endforeach ?>
					<li class="da">
						<a href="<?php echo U('category',array('cid'=>44));?>" class="show"><img src="http://localhost/Gshop/template/images/53911f2cNfce73bfa.jpg" alt="" /></a>
						<a href="{U:'category',array('cid'=>49)}"><img src="http://localhost/Gshop/template/images/5391cf40N1278fd40.jpg" alt="" /></a>
						<a href="<?php echo U('category',array('cid'=>56));?>"><img src="http://localhost/Gshop/template/images/539263a8N90221984.jpg" alt="" /></a>
						<a href="<?php echo U('category',array('cid'=>56));?>"><img src="http://localhost/Gshop/template/images/5391f049Neb44cbc1.jpg" alt="" /></a>
						<p>
							<span class='xuan'></span>
							<span ></span>
							<span ></span>
							<span ></span>
						</p>
					</li>
					
							<?php
			$cid=explode(",",str_replace(' ','', '20,43,44,45,46,47,49,51,54,56,58,59,42'));
			$Model=M("goods");
			$result=$Model->order("rand()")->limit(1,6)->where(array("cid"=>$cid))->all();
			foreach($result as $field):
				$field['url']=U('content',array("gid"=>$field['gid']));
				$field['index_pic']="http://localhost/Gshop/".$field['index_pic'];
			
			?>
					<li>
						<a href="<?php echo $field['url'];?>" class="jiadian_img_a"><img src="<?php echo $field['index_pic'];?>" alt="" /></a>
						<a href="<?php echo $field['url'];?>" class="name"><?php echo $field['gname'];?></a>
						<span>￥<?php echo $field['price'];?></span>
					</li>
				<?php endforeach ?>
			</ul>
<!-- 笔记本区域开始 -->
				<ul >
								<?php
			$cid=explode(",",str_replace(' ','', '40,44'));
			$Model=M("goods");
			$result=$Model->order("rand()")->limit(1,6)->where(array("cid"=>$cid))->all();
			foreach($result as $field):
				$field['url']=U('content',array("gid"=>$field['gid']));
				$field['index_pic']="http://localhost/Gshop/".$field['index_pic'];
			
			?>
					<li>
						<a href="<?php echo $field['url'];?>" class="jiadian_img_a"><img src="<?php echo $field['index_pic'];?>" alt="" /></a>
						<a href="<?php echo $field['url'];?>" class="name"><?php echo $field['gname'];?></a>
						<span>￥<?php echo $field['price'];?></span>
					</li>
				<?php endforeach ?>
				</ul>
<!-- 笔记本区域结束 -->

<!-- 数码影音区域开始 -->
				<ul >
								<?php
			$cid=explode(",",str_replace(' ','', '20,45,53'));
			$Model=M("goods");
			$result=$Model->order("rand()")->limit(1,6)->where(array("cid"=>$cid))->all();
			foreach($result as $field):
				$field['url']=U('content',array("gid"=>$field['gid']));
				$field['index_pic']="http://localhost/Gshop/".$field['index_pic'];
			
			?>
					<li>
						<a href="<?php echo $field['url'];?>" class="jiadian_img_a"><img src="<?php echo $field['index_pic'];?>" alt="" /></a>
						<a href="<?php echo $field['url'];?>" class="name"><?php echo $field['gname'];?></a>
						<span>￥<?php echo $field['price'];?></span>
					</li>
				<?php endforeach ?>
				</ul>
<!-- 数码影音区域结束 -->

<!-- 电脑配件区域开始 -->
				<ul >
								<?php
			$cid=explode(",",str_replace(' ','', '42,43,58'));
			$Model=M("goods");
			$result=$Model->order("rand()")->limit(1,6)->where(array("cid"=>$cid))->all();
			foreach($result as $field):
				$field['url']=U('content',array("gid"=>$field['gid']));
				$field['index_pic']="http://localhost/Gshop/".$field['index_pic'];
			
			?>
					<li>
						<a href="<?php echo $field['url'];?>" class="jiadian_img_a"><img src="<?php echo $field['index_pic'];?>" alt="" /></a>
						<a href="<?php echo $field['url'];?>" class="name"><?php echo $field['gname'];?></a>
						<span>￥<?php echo $field['price'];?></span>
					</li>
				<?php endforeach ?>
				</ul>
<!-- 电脑配件区域结束 -->

<!-- 外设办公区域开始 -->
				<ul >
								<?php
			$cid=explode(",",str_replace(' ','', '51,59,56'));
			$Model=M("goods");
			$result=$Model->order("rand()")->limit(1,6)->where(array("cid"=>$cid))->all();
			foreach($result as $field):
				$field['url']=U('content',array("gid"=>$field['gid']));
				$field['index_pic']="http://localhost/Gshop/".$field['index_pic'];
			
			?>
					<li>
						<a href="<?php echo $field['url'];?>" class="jiadian_img_a"><img src="<?php echo $field['index_pic'];?>" alt="" /></a>
						<a href="<?php echo $field['url'];?>" class="name"><?php echo $field['gname'];?></a>
						<span>￥<?php echo $field['price'];?></span>
					</li>
				<?php endforeach ?>
				</ul>
<!--外设办公区域结束   -->
			</div>
		</div>
		<!-- 中间结束 -->
		<!-- 右侧 -->
		<div class="jiadian_r fr">
			<h2>
				<a href="" class="fl">大家电配送</a><a href="" class="fl">合约计划说明</a>
			</h2>
			<ul class="jiadian_r_ul">
				<li><a href=""><img src="images/logo/rBEhU1MFc-EIAAAAAAAGA0YdZm0AAIyOAJFYpgAAAYb974.gif" alt="" /></a><a href=""><img src="images/logo/rBEhU1Jo4wMIAAAAAAAJqzM_u-EAAEiuAIhTskAAAnD954.jpg" alt="" /></a></li>
			</ul>
		</div>
		<!-- 右侧结束 -->
	</div>
	<!-- 家电通讯结束 -->

	<!-- 底部导航 -->
	<div class="dibu_menu">
		<a href="">关于我们</a> <a href="">联系我们</a> <a href="">人才招聘</a> <a href="">商家入驻</a><a href="">广告服务</a> <a href="">手机京东</a> <a href="">友情链接</a><a href="">销售联盟</a><a href="">京东社区</a> <a href="">京东公益</a><a href="" class="last">English Site</a>
	</div>
	<!-- 底部导航结束 -->
	<!-- icp信息 -->
	<div class="icp">
		<p>
			北京市公安局朝阳分局备案编号110105014669&nbsp;|&nbsp;京ICP证070359号&nbsp;|&nbsp;互联网药品信息服务资格证编号(京)-非经营性-2011-0034 <br />
			<a href="">音像制品经营许可证苏宿批005号</a>&nbsp;|&nbsp;出版物经营许可证编号新出发(苏)批字第N-012号&nbsp;|&nbsp;互联网出版许可证编号新出网证(京)字150号
			<br />
			<a href="">网络文化经营许可证京网文[2011]0168-061号</a>Copyright&nbsp;©&nbsp;2004-2014&nbsp;&nbsp;京东JD.com&nbsp;版权所有	
			<br />
			京东旗下网站：<a href="">360TOP</a><a href="">迷你挑</a>
		</p>
		<div class="icp_img clear">
			<a href="" class="icp_img1"><img src="http://localhost/Gshop/template/images/icp_img1.gif" alt="" /></a>
			<a href="" class="icp_img2"><img src="http://localhost/Gshop/template/images/icp_img2.gif" alt="" /></a>
			<a href="" class="icp_img3"><img src="http://localhost/Gshop/template/images/icp_img3.png" alt="" /></a>
			<a href="" class="icp_img3"><img src="http://localhost/Gshop/template/images/icp_img4.png" alt="" /></a>
		</div>

	</div>
	<!-- icp信息结束 -->
	</div>
<!-- 中间主体区域结束 -->
</body>
</html>